<?php

namespace App\Models;


use App\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class ChatRoomMsg extends Model
{

    use HasFactory, HasDateTimeFormatter;

    protected $table = 'chat_room_msg';

    protected $casts =[
        'room_id' => 'integer',
        'sender_id' => 'integer'
    ];

    public function sender()
    {
        return $this->belongsTo(User::class, 'sender_id');
    }
}
